From: Georges Basile Stavracas Neto Date: Thu, 24 Sep 2020 18:57:12 +0000 (-0300) Subject: appDisplay: Don't change opacity on destruction X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~655^2^2~5 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=33bd038af256551430b21f9fe96711515d745fb4;p=gnome-shell.git appDisplay: Don't change opacity on destruction At the end of BaseAppView._clearAnimateLater(), the '_grid' actor's opacity is set to 255. As it turns out, _clearAnimateLater() is called, among others, by vfunc_unmap(). However, unmapping is part of the destruction process, and at the time it is called, '_grid' is already destroying, which makes GJS complain about accessing an invalid object. Don't change opacity on BaseAppView._clearAnimateLater(), and instead move it to the couple of places outside vfunc_unmap() that call it. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 840d4fd3e..fa2782d81 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -654,7 +654,6 @@ var BaseAppView = GObject.registerClass({ this.disconnect(this._viewLoadedHandlerId); this._viewLoadedHandlerId = 0; } - this._grid.opacity = 255; } animate(animationDirection, onComplete) { @@ -666,6 +665,7 @@ var BaseAppView = GObject.registerClass({ } this._clearAnimateLater(); + this._grid.opacity = 255; if (animationDirection == IconGrid.AnimationDirection.IN) { const doSpringAnimationLater = laterType => { @@ -684,6 +684,7 @@ var BaseAppView = GObject.registerClass({ this._viewLoadedHandlerId = this.connect('view-loaded', () => { this._clearAnimateLater(); + this._grid.opacity = 255; doSpringAnimationLater(Meta.LaterType.BEFORE_REDRAW); }); }